
package com.cbwl.eoas.cms.model.sysconfig;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotBlank;

import com.cbwl.eoas.common.base.CommonBean;


public class DictRegionDTO extends CommonBean {

	
	/**
	 * 
	 */
	private static final long serialVersionUID = 1329994713740433220L;
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
	
	private java.lang.Long id;
	@NotBlank @Length(max=256)
	private java.lang.String name;
	@NotBlank @Length(max=32)
	private java.lang.String code;
	@Length(max=32)
	private java.lang.String level;
	@NotBlank @Length(max=32)
	private java.lang.String pcode;
	@Length(max=32)
	private java.lang.String p1code;
	@Length(max=32)
	private java.lang.String p2code;
	
	private java.lang.Long creater;
	
	private java.util.Date gmtCreate;
	
	private java.lang.Long modifier;
	
	private java.util.Date gmtModified;
	//columns END

	
	public void setId(java.lang.Long value) {
		this.id = value;
	}
	
	public java.lang.Long getId() {
		return this.id;
	}
	
	public void setName(java.lang.String value) {
		this.name = value;
	}
	
	public java.lang.String getName() {
		return this.name;
	}
	
	public void setCode(java.lang.String value) {
		this.code = value;
	}
	
	public java.lang.String getCode() {
		return this.code;
	}
	
	public void setLevel(java.lang.String value) {
		this.level = value;
	}
	
	public java.lang.String getLevel() {
		return this.level;
	}
	
	public void setPcode(java.lang.String value) {
		this.pcode = value;
	}
	
	public java.lang.String getPcode() {
		return this.pcode;
	}
	
	public void setP1code(java.lang.String value) {
		this.p1code = value;
	}
	
	public java.lang.String getP1code() {
		return this.p1code;
	}
	
	public void setP2code(java.lang.String value) {
		this.p2code = value;
	}
	
	public java.lang.String getP2code() {
		return this.p2code;
	}
	
	public void setCreater(java.lang.Long value) {
		this.creater = value;
	}
	
	public java.lang.Long getCreater() {
		return this.creater;
	}
	
	public void setGmtCreate(java.util.Date value) {
		this.gmtCreate = value;
	}
	
	public java.util.Date getGmtCreate() {
		return this.gmtCreate;
	}
	
	public void setModifier(java.lang.Long value) {
		this.modifier = value;
	}
	
	public java.lang.Long getModifier() {
		return this.modifier;
	}
	
	public void setGmtModified(java.util.Date value) {
		this.gmtModified = value;
	}
	
	public java.util.Date getGmtModified() {
		return this.gmtModified;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("Name",getName())
			.append("Code",getCode())
			.append("Level",getLevel())
			.append("Pcode",getPcode())
			.append("P1code",getP1code())
			.append("P2code",getP2code())
			.append("Creater",getCreater())
			.append("GmtCreate",getGmtCreate())
			.append("Modifier",getModifier())
			.append("GmtModified",getGmtModified())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof DictRegionDTO == false) {return false;}
		if(this == obj) {return true;}
		DictRegionDTO other = (DictRegionDTO)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

